package com.zt.event.event.event;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.SpringApplicationEvent;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @author system
 */
public class CustomsApplicationEnvironmentPreparedEvent extends SpringApplicationEvent {

    private final ConfigurableEnvironment environment;
    private final long costTime;

    /**
     * {@link CustomsApplicationEnvironmentPreparedEvent}
     * @param application
     * @param args
     * @param environment
     * @param costTime
     */
    public CustomsApplicationEnvironmentPreparedEvent(SpringApplication application, String[] args,
                                                      ConfigurableEnvironment environment,long costTime) {
        super(application, args);
        this.environment = environment;
        this.costTime = costTime;
    }

    /**
     * Return the environment.
     *
     * @return the environment
     */
    public ConfigurableEnvironment getEnvironment() {
        return this.environment;
    }


    public long getCostTime() {
        return this.costTime;
    }

}